<?php
/**
 * 考勤核查
 * @author Administrator
 *
 */
namespace Manager\Controller;
use Home\Controller\CommonController;
class CheckController extends CommonController {
	
	private $class;
	
	function _initialize(){
		parent::_initialize();
		$this->class = D("YgclClass");
	}
	
	public function index(){
		$uid = $_SESSION['_loginUser_home']['uid'];
		$did = I('get.did');
		$this->list = $this->class->where(array('did'=>$did,'status'=>1))->order('listorder desc')->select();
		$this->display();
	}
	
	public function lesson(){
		$cid = I('get.cid');
		$this->classinfo = $this->class->where(array('id'=>$cid))->find();
		$this->list = D('YgclLesson')->where(array('cid'=>$cid,'status'=>1))->relation(true)->order('listorder desc')->select();
		$this->display();
	}
	
	public function timelist(){
		$this->display();
	}
	
	public function gettimeinfo(){
		$lid = I('lid');
		$page = I('page',1);
		$info = D('YgclSign')->where(array('lid'=>$lid))->order('title desc')->page($page,10)->select();
		count($info) < 10 ? $next = 'no':$next = 'yes';
		$data = array(
				'next'=>$next,
				'info'=>$info,
		);
		// 		$info['content'] = str_to_html($info['content']);
		$this->ajaxReturn($data);
	}
	
	public function detail(){
		$id = I('id');
		$info = D('YgclSign')->where(array('id'=>$id))->find();
		//已存在学生
		
		$this->info = $info;
		$this->display();
	}
	
	
}